package com.softeem.dao;

import com.softeem.bean.CartItem;

import java.sql.SQLException;
import java.util.List;

public interface CartItemDao {
    public int addCart(CartItem cartItem)throws SQLException;
    public int deleteCartById(Integer id)throws SQLException;
    public int deleteCartByUid(Integer uid)throws SQLException;
    public int updateCartCountById(
            Integer id,Integer count,Double totalPrice)throws SQLException;
    public CartItem findByNameAndUid(String name,Integer uid)throws SQLException;
    public Integer findByUidCount(Integer uid)throws SQLException;
    public List<CartItem> findCartByUid(int begin, int pageSize,Integer uid)throws SQLException;

    public CartItem findById(Integer id)throws SQLException;
}
